<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Education Management System</title>
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='stylesheets/admin_index.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='stylesheets/index.css') }}">
    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='stylesheets/tw.css') }}">
</head>

<body>

    <header>
        <span class="title">Educational Management System</span>
        <a id="logout-btn" href="/logout">Logout</a>
        <a id="welcome">Welcome, {{name}} ({{kind}})</a>
    </header>

    <div style="height: calc(100vh - 76px);" class="flex items-start w-full">
        <nav id="sidebar">
            <ul>
                <li><a href="/" class="active">Home</a></li>
                <li><a href="/assignment/page">Assignment Management</a></li>
                <li><a href="/instructor/message">Messages</a></li>
                <li><a href="/notifications">Notifications</a></li>
                <li><a href="/forum">Forum</a></li>
            </ul>
        </nav>
    
        <div class="table_display_div flex-auto">
            <div class="table_head">
                <b>Lecture Management</b>
                <form class="table_search" name="message_search" id="message_search" method="get">
                    <input type="text" name="search_input" id="search_input" class="input">
                    <input type="submit" name="search" id="search" value="Search" class="input-btn">
                </form>
                <button class="stroke-btn" name="requests" id="requests" type="button" onclick="window.location.href='/lecture/create'">
                    Create Lectures
                </button>
            </div>
            <table class="table_display" id="lecture_table" name="lecture_table">
                <thead>
                    <tr>
                        <th>Lecture ID</th>
                        <th>Course Name</th>
                        <th>Lecture Name</th>
                        <th>Instructor</th>
                        <th>Description</th>
                        <th>Details</th>
                        <th>Resources Download</th>
                    </tr>
                </thead>
                <tbody>
                    {% for lecture in lectures %}
                    <tr>
                        <td>{{lecture[0]}}</td>
                        <td>{{lecture[6]}}</td>
                        <td>{{lecture[2]}}</td>
                        <td>{{lecture[3]}}</td>
                        <td>{{lecture[4]}}</td>
                        <td><a href="/lecture/view?lecture_id={{lecture[0]}}" class="main-btn">View</a>&nbsp;</td>
                        <td><a href="{{lecture[5]}}" download class="sub-btn">Download</a></td>
                    </tr>
                    {% endfor %}
                </tbody>
            </table>
        </div>
    </div>

    <footer></footer>

    <script src="{{ url_for('static', filename='js/main.js') }}"></script>

</body>

</html>